package my2Cents.tools;

import java.awt.Color;

import net.phys2d.raw.Body;

public class RemoverField extends AbstractBodyModifier {
	
	public RemoverField() {
		setName("Remover Field");
		setDescription("Removes any Non-Static body that\n" +
				"touches it. Click on an object\n" +
				"to make it a remover field.");
	}
	
	protected void modify(Body b) {
		if(b.isRemoverField()) {
			unModify(b);
			return;
		}
		
		super.modify(b);
		b.setRemoveOther(true);
		b.setDrawColor(Color.red);
	}
	
	protected void unModify(Body b) {
		b.setRemoveOther(false);
		b.setDrawColor(Color.BLACK);
	}
}
